package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class SetChatAbilityMethods extends BaseMethods {

    private static SetChatAbilityMethods m_ins = null;

    public static SetChatAbilityMethods getInstance() {
        if (m_ins == null) {
            synchronized (SetChatAbilityMethods.class) {
                if (m_ins == null) {
                    m_ins = new SetChatAbilityMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Personal/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void set_chatting(Subscriber<Object> subscriber,
                      int uid  ,
                      String hashid   ,String chatting     ) {
        Observable observable = initService().set_chatting(System.currentTimeMillis()+"",
                "4e3124b1437709f9420629159214f79c",uid,hashid,chatting
        );
        toSubscribe(observable, subscriber);
    }
}
